//
//  Contents.m
//  22-QQ_MV_HomeWork
//
//  Created by 曹曹 on 16/8/15.
//  Copyright © 2016年 曹曹. All rights reserved.
//

#import "Contents.h"
#import "List.h"

@implementation Contents
- (void)setValue:(id)value forKey:(NSString *)key {
    [super setValue:value forKey:key];
    if ([key isEqualToString:@"list"]) {
        NSMutableArray *arr = [NSMutableArray array];
        NSArray *valueArray = value;
        for (NSDictionary *dictionary in valueArray) {
            List *list = [List modelWithDictionary:dictionary];
            [arr addObject:list];
        }
        _list  = arr;
    }
}
@end
